<!DOCTYPE html>
<html>
<head>
    <title>绩效申报</title>
    <#include "/header.html">

</head>
<body>
<div id="spapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-2">
                <label>主题:</label>
                <select v-model="q.assessId" placeholder="考核主题" class="layui-select" autocomplete="on">
                    <option value="" selected>全部</option>
                    <option :value="a.id" v-for="a in assess" >{{a.title}}</option>
                </select>
            </div>
            <div class="form-group col-sm-2">
                <label>状态:</label>
                <select v-model="q.status"  placeholder="状态" class="layui-select"  autocomplete="on">
                    <option value="0,1,2,3" selected>全部</option>
                    <option value="0" >未审批</option>
                    <option value="1" >已申报未审批</option>
                    <option value="2" >审核通过</option>
                    <option value="3" >审核未通过</option>
                </select>
            </div>
            <a class="btn btn-default" @click="query">查询</a>
<#if shiro.hasPermission("assess:declare:save")>
<a class="btn btn-primary" @click="add"><i class="fa fa-pencil-square-o"></i>&nbsp;申报</a>
</#if>
<!--<#if shiro.hasPermission("assess:declare:update")>-->
<!--<a class="btn btn-primary" @click="update"><i class="fa fa-plus"></i>&nbsp;修改</a>-->
<!--</#if>-->
<#if shiro.hasPermission("assess:declare:delete")>
<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
</#if>
</div>
<table id="jqGrid"></table>
<div id="jqGridPager"></div>
</div>
<div class="layui-row layui-col-space10">
    <div class="layui-col-md6">
        <div v-show="!showList" class="panel panel-default">
            <div class="panel-heading">
                <h3>考核说明</h3>
            </div>
            <div class="panel-body">
                <ul class="list-group">
                    <li class="list-group-item"><b>考核标题：</b>{{declare.assessSet.title}}</li>
                    <li class="list-group-item"><b>考核总分：</b>{{declare.assessSet.score}}</li>
                    <li class="list-group-item"><b>起始日期：</b>{{declare.assessSet.startDate}}~{{declare.assessSet.endDate}}
                    </li>
                    <li class="list-group-item"><b>评分标准：</b>{{declare.assessSet.standard}}</li>
                    <li class="list-group-item"><b>考核说明：</b>{{declare.assessSet.remark}}</li>
                </ul>
            </div>
        </div>
    </div>
    <div class="layui-col-md6">
        <div v-show="!showList" class="panel panel-default">
            <div class="panel-heading">
                <h3>考核项说明</h3>
            </div>
            <div class="panel-body">
                <ul class="list-group">
                    <div v-for="(item, index) in declare.items" :key="index">
                        <li class="list-group-item">
                            <b>{{item.name}}：</b>
                            <b>总分：</b>{{item.totalScore}}
                            <b>评分标准：</b>{{item.standard}}
                        </li>
                    </div>
                </ul>
            </div>
        </div>
    </div>
</div>
<div v-show="!showList" class="panel panel-default">
    <div class="panel-heading">
        <h3>自主申报</h3>
    </div>
    <div class="panel-body">
        <form class="form-horizontal" id="assess_item_from">

                <div v-for="(item, index) in declare.items" :key="index">
                    <div class="layui-row">
                        <div class="layui-col-md6">
                            <div class="form-group">
                                <label name="itemId" class="itemId" style="display:none">{{item.id}}</label>
                                <div class="col-sm-2 control-label">{{item.name}}</div>
                                <div class="col-sm-10">
                                    <textarea type="text" class="form-control" name="content"></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="layui-col-md6">
                            <div class="form-group">
                                <div class="col-sm-2 control-label">自评分</div>
                                <div class="col-sm-10">
                                    <input type="number" name="score"
                                           class="layui-input" autocomplete="off">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            <div class="form-group">
                <div class="layui-upload">
                    <button type="button" class="layui-btn layui-btn-normal" id="test8">选择文件</button>
                    <input type="hidden" name="filePath" v-model="declare.filePath"
                           class="layui-input" autocomplete="off">
                    <button type="button" class="layui-btn" id="test9">开始上传</button>
                </div>
<!--                <div class="col-sm-2 control-label">上传附件</div>-->
<!--                <div class="col-sm-10">-->
<!--                    <input type="file" name="filePath" lay-type="file" class="layui-upload-button">-->
<!--                </div>-->
            </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label"></div>
                    <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                    &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
                </div>

        </form>
    </div>
</div>

<!-- 选择部门 -->
<div id="ItemLayer" style="display: none;padding:10px;">
    <table id="assessItem"></table>
    <div id="assessItemPager"></div>

</div>
<script src="${request.contextPath}/statics/js/modules/assess/assessDeclare.js?_${.now?long}"></script>
</body>
</html>